package com.cz.ssyx.order.api;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.cz.ssyx.model.order.OrderInfo;
import com.cz.ssyx.order.service.OrderInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @descriptions:
 * @author: Joker.
 * @date: 2024/5/8 22:07
 * @version: 1.0
 */
@RestController
@RequestMapping("api/order")
public class OrderApiController {

    @Autowired
    private OrderInfoService orderInfoService;

    @GetMapping("inner/getOrderInfo/{orderNo}")
    public OrderInfo getOrderInfo(@PathVariable String orderNo) {
        return orderInfoService.getOne(new LambdaQueryWrapper<OrderInfo>()
                .eq(OrderInfo::getOrderNo, orderNo));
    }
}
